//
//  RequestFactory.h
//  Kids
//
//  Created by LiTengFei on 14/11/26.
//  Copyright (c) 2014年 90's Technology Co.Ltd. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "RequestData.h"
#import "ResponseData.h"

#import "AFNetworking.h"
@interface RequestFactory : NSObject
+ (instancetype)shareFactoryInstace;

+ (void)requestWithRequestData:(RequestData*)data
                       success:(void (^)(AFHTTPRequestOperation* operation, NSDictionary* responseObject))success
                       failure:(void (^)(AFHTTPRequestOperation* operation, NSError* error))failure;

- (void)requestWithRequestData:(RequestData*)data
                       success:(void (^)(AFHTTPRequestOperation* operation, NSDictionary* responseObject))success
                       failure:(void (^)(AFHTTPRequestOperation* operation, NSError* error))failure;

/*
 *  data 请求数据模型
 *  responseData 响应数据模型
 *  complete 响应回调函数 success responseData 为响应数据 error＝nil
 *                      failure error 是错误信息 response = nil
 */
+ (void)requestWithRequestData:(RequestData*)data forResponseData:(ResponseData*)responseData
                      complete:(void (^)(ResponseData* responseData, NSError* error))complete;

/*
 *  data 请求数据模型
 *  responseData 响应数据模型
 *  complete 响应回调函数 success responseData 为响应数据 error＝nil
 *                      failure error 是错误信息 response = nil
 */
- (void)requestWithRequestData:(RequestData*)data forResponseData:(ResponseData*)responseData
                      complete:(void (^)(ResponseData* responseData, NSError* error))complete;

@end
